<?php

namespace App\Service\UserCenter;

use App\Model\UserProfile;
use App\Service\BaseService;

/**
 * 允许（关闭）接听语音通话
 */
class CallPermitService extends BaseService
{
    public function handle()
    {
        $userId = $this->getUserId();
        //1-允许接听，0-关闭接听
        $op = $this->request->input('op', 1);
        //基本资料
        $ret = UserProfile::updateCallPermit($userId, $op);
        return ['result' => 1];
    }
}
